﻿@using Bids.Core.Common.Pager;
@model Bids.Core.DomainObjects.Task
@{
    int page = (int) TempData["page"];
    var list = Model.Contributions.AsQueryable().ToPagedList(page, 12);
}
<ul>
                    @foreach (var item in list)
                    {
                        <li class="">
                        <div class="pic">
                            <a href="#" target="_blank">

                                <img src="@item.ContributionItems.OrderByDescending(t=>t.Logo).FirstOrDefault()" onmouseover="toolTip(jQuery('#pic_@(item.ID)').html())" onmouseout="toolTip()">

                            </a>
                            <p>
                                <strong>设计人：</strong> @item.Designer.NickName<br />
                                <strong>提交时间：</strong> @string.Format("{0:yyyy-MM-dd}",item.CreateTime)
                            </p>
                        </div>
                            <div id="pic_@(item.ID)" style="display:none">
                                <div class="pic" style="width:200px;border:1px #ccc solid;padding:5px;">
                                    <a href="#" target="_blank">

                                        <img src="@item.ContributionItems.OrderByDescending(t=>t.Logo).FirstOrDefault()">

                                    </a>
                                    <p>
                                        <strong>设计人：</strong> @item.Designer.NickName<br />
                                        <strong>提交时间：</strong> @string.Format("{0:yyyy-MM-dd}",item.CreateTime)
                                    </p>
                                    @foreach (var com in item.Comments)
                                {
                                    
                                        <div style="width:inherit;margin-top:5px;"><p>@com.User.DisplayName :  <span style="float:right">@string.Format("{0:yyyy-MM-dd}",com.CreateTime)</span></p></div>
                                        <div style="line-height:18px;">@com.Content</div>
                                }
                                </div>
                            </div>
                    </li>
                    }
                    

                    
                </ul>
                <div class="page">
                    @Ajax.Pager(list, new PagerOptions { 
                PageIndexParameterName = "page",
               CurrentPageNumberFormatString="<A href='javascript:;'>{0}</a>",
               ShowFirstLast = false,
               NumericPagerItemCount = 3
                
               }, new AjaxOptions
               {
                   UpdateTargetId = "worklist"
               })
                    

                </div>